home *** CD-ROM | disk | FTP | other *** search
- Path: due.unit.no!usenet
- From: Per Ivar Helgesen <ph@iok.unit.no>
- Newsgroups: comp.lang.c++
- Subject: Re: DLL Trouble
- Date: Tue, 30 Jan 1996 11:25:28 +0000
- Organization: SINTEF Applied Economics
- Message-ID: <310E0028.568C@iok.unit.no>
- References: <4ehig2$7d3@newsbf02.news.aol.com>
- NNTP-Posting-Host: markus.iok.unit.no
- Mime-Version: 1.0
- Content-Type: text/plain; charset=us-ascii
- Content-Transfer-Encoding: 7bit
- X-Mailer: Mozilla 2.0b5 (Win95; I)
-
- Jason Cone wrote:
- > I am trying to use Turbo C++ Visual Edition for Windows to write a DLL
- > which contains a single exportable function called rolldice....
- > Following is the C/C++ code for the DLL:...
- > int far pascal _export rolldice(int, int);
-
- I guess that your procedure-name is getting mangled by C++.
- I assume that you haven't made a def-file with the procedure-name listed,
- since you have declared the function as _export.
-
- You have to declare your "rolldice"-procedure as extern "C":
- extern "C" int far pascal _export rolldice(int sides, int qty)
- This will prevent name-mangling, hope that helps.
-
- ___ //// __________________________________________________
- |--00 Per Ivar Helgesen, SINTEF Applied Economics
- C ^ ph@iok.unit.no , tel +47 7359 0806
- ___ \ ~/ __________________________________________________
-